# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=rinetd
pkgver=0.62
pkgrel=5
pkgdesc='Internet redirection server.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-networking')
url='http://www.boutell.com/rinetd'
license=('GPL')
#source=('http://www.boutell.com/rinetd/http/rinetd.tar.gz')
source=("https://src.fedoraproject.org/repo/pkgs/rinetd/rinetd.tar.gz/28c78bac648971724c46f1a921154c4f/$pkgname.tar.gz")
sha512sums=('b6ddb496b4542ad46aacaef4b2241b16b9ee43f2f6761a18a4813d83a0a9db23fbd73a554393dcf01ae7350e8b6662571414ca6f93a949ce4effbbeddc198606')

build() {
  cd $pkgname

  cc -DLINUX -g   -c -o "$pkgname.o" "$pkgname.c"
  cc -DLINUX -g   -c -o match.o match.c
  gcc "$pkgname.o" match.o -o $pkgname
}

package(){
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 "$pkgname.8" "$pkgdir/usr/share/man/man8/$pkgname.8"
}

